package com.lovo.commodity.controller;


import com.lovo.commodity.service.ICommoditySnapshotService;
import com.lovo.common.bean.CommoditySnapshotBean;
import com.lovo.common.result.ResponseResult;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author bdk
 * @since 2021-03-10
 */
@RestController
@RequestMapping("/commoditySnapshots")
@ResponseResult
public class CommoditySnapshotController {
    @Resource
    private ICommoditySnapshotService commoditySnapshotService;
    @PostMapping
    public Object add(@RequestBody CommoditySnapshotBean commoditySnapshotBean){
        commoditySnapshotService.save(commoditySnapshotBean);
        return commoditySnapshotBean;
    }
}

